package ViewPackage;

import java.awt.Graphics;
import java.awt.event.MouseEvent;

public abstract class MenuButton {
	protected int x,y;
	protected int width;
	protected int height;
	
	public MenuButton(int x,int y,int width,int height){
		this.x=x;
		this.y=y;
		this.height=height;
		this.width=width;
	}
	
	public int getX(){
		return x;
	}
	public int getY(){
		return y;
	}
	public int getWidth(){
		return width;
	}
	public int getHeight(){
		return width;
	}
	public boolean isClicked(MouseEvent e){
		if(e.getX()>=this.getX() && (e.getX()<(x+width))){
			if(e.getY()>=y && (e.getY() <(y+height))){
				return true;
			}
		}
		return false;
	}
	
	public abstract void draw(Graphics g);

}
